package cn.starlightsoftware.sherly.service.permission;

import cn.starlightsoftware.sherly.controller.admin.permission.vo.PermissionSaveReqVO;
import cn.starlightsoftware.sherly.db.model.permission.PermissionDO;

import javax.validation.Valid;
import java.util.List;

/**
 * @author 谷子毅
 */
public interface PermissionService {
    
    /**
     * 权限新增
     * @param reqVO
     */
    void save(@Valid PermissionSaveReqVO reqVO);

    /**
     * 权限详情
     * @param permissionId
     * @return
     */
    PermissionDO detail(String permissionId);

    /**
     * 权限删除
     * @param permissionId
     */
    void delete(String permissionId);

    /**
     * 权限修改
     * @param reqVO
     */
    void update(@Valid PermissionSaveReqVO reqVO);

    /**
     * 权限列表
     * @return
     */
    List<PermissionDO> list();
}
